<?php

namespace app\queue\stomp;

use app\queue\BaseConsumer;
use common\service\CapacityService;

class SyncCapacityPoolConsumer extends BaseConsumer
{

    // 要消费的队列名
    public $queue = 'sync_capacity_pool';

    // 连接名，对应 config/redis_queue.php 里的连接`
    public $connection = 'default';

    /**
     * @param $data
     */
    public function doConsume($data)
    {
        CapacityService::getInstance()->syncCapacityPoolData($data['tenant_id'], $data['user_ids'], $data['tenant_position_id']);
    }
}
